Naming Conventions (NC)

Description:

NC checks whether the code conforms to the naming guidelines. Naming guidelines for C# are the following:

Incorrect:

class myClass {
    const int max_size = 10;
  
    void myMethod() {
        int Var;
    }
} 

Correct:

class MyClass {
    const int MaxSize = 10;
  
    void MyMethod() {
        int var;
    }
} 

Incorrect:

class ConversionException {
    ...
}

class InvocationError : System.Exception {
    ...
}

Correct:

class ConversionError {
    ...
}

class InvocationException : System.Exception {
    ...
}

Refactoring: